

package at.fhj.itm.metadata.impl.postgres;

import at.fhj.itm.metadata.impl.AbstractProcedure;
import java.util.List;
import static at.fhj.itm.metadata.MetadataUtil.copyMetadataList;
/**
 *
 * @author Seuchter
 */
public class PostgresProcedure extends AbstractProcedure{

    private long oid;
    private List<PostgresProcedureArgument> arguments;
    private String language;
    private PostgresSqlDataType returnType;

    public PostgresProcedure(final String name, final String src, List<PostgresProcedureArgument> args, PostgresSqlDataType returnType, String lang, final  long oid)
    {
        super(name, src);
        this.oid = oid;
        this.returnType = returnType;
        this.language = lang;
        this.arguments = args;
    }


    public long getOid()
    {
        return oid;
    }
    public PostgresSqlDataType getReturnType(){
        return returnType;
    }

    public List<PostgresProcedureArgument> getArguments(){
        return arguments;
    }

    public String getLanguage(){
        return language;
    }

    public PostgresProcedure copy(){
        return new PostgresProcedure(getName(), getSource(), copyMetadataList(getArguments()),
                getReturnType().copy(), name, -1);
    }



}
